<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改仪器设备历史校验')" />
	<th:block th:include="include :: datetimepicker-css" />
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: datetimepicker-js" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tJcJcjgJcyqLs-edit" th:object="${tJcJcjgJcyqLs}">
            <input id="jcjgLsId" name="jcjgLsId" hidden="hidden" th:field="*{jcjgLsId}"  type="hidden">
			<div class="form-group" hidden>
				<label class="col-sm-3 control-label">设备信息业务ID：</label>
				<div class="col-sm-8">
					<input id="jcjgJcyqId" name="jcjgJcyqId" hidden="hidden" th:field="*{jcjgJcyqId}" class="form-control" type="text">
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">校验结果：</label>
						<div class="col-sm-8">
							<input id="checkResult" name="checkResult" th:field="*{checkResult}" class="form-control" type="text">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">检测单位：</label>
						<div class="col-sm-8">
							<input id="checkStation" name="checkStation" th:field="*{checkStation}" class="form-control" type="text">
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">检测日期：</label>
						<div class="col-sm-8">
							<input id="checkTime" name="checkTime" th:value="${#dates.format(tJcJcjgJcyqLs.checkTime,'yyyy-MM-dd')}" class="form-control" type="text" placeholder="yyyy-MM-dd">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">检测证书编号：</label>
						<div class="col-sm-8">
							<input id="certificateNum" name="certificateNum" th:field="*{certificateNum}" class="form-control" type="text" >
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">有效期始：</label>
						<div class="col-sm-8">
							<input id="startTime" name="startTime" th:value="${#dates.format(tJcJcjgJcyqLs.startTime,'yyyy-MM-dd')}" class="form-control" type="text" placeholder="yyyy-MM-dd">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-4 control-label">有效期止：</label>
						<div class="col-sm-8">
							<input id="endTime" name="endTime" th:value="${#dates.format(tJcJcjgJcyqLs.endTime,'yyyy-MM-dd')}" class="form-control" type="text" placeholder="yyyy-MM-dd">
						</div>
					</div>
				</div>
			</div>
		</form>
    </div>
	<div class="row">
		<div class="col-sm-offset-5 col-sm-10">
			<button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
			<button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
		</div>
	</div>
    <script type="text/javascript">
		var prefix = ctx + "system/tJcJcjgJcyqLs";
		$("#checkTime").datetimepicker({
			format: "yyyy-mm-dd",
			minView: "month",
			autoclose: true
		});
		$("#startTime").datetimepicker({
			format: "yyyy-mm-dd",
			minView: "month",
			autoclose: true
		});
		$("#endTime").datetimepicker({
			format: "yyyy-mm-dd",
			minView: "month",
			autoclose: true
		});

		$("#form-tJcJcjgJcyqLs-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-tJcJcjgJcyqLs-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
